<% layout('/layout/default.html', {title: 'JAVA机试信息详情', libs: ['validate', 'icheck']}){ %>
<div class="main-content">
		<div class="card-header">
				<i class="fas fa-pencil-alt"></i> ${javaTest.isNewRecord?'新增JAVA机试信息':'编辑JAVA机试信息'}
		</div>
		<#form:form id="inputForm" model="${javaTest}" class="form-horizontal" action="${ctx}/yili/javaTest/save" method="post" >
			<div class="card-body">
				<#form:hidden path="id"/>
				<#form:hidden path="code"/>
				<div class="row">
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="">
							 姓名：
							</label>
							<div class="col-lg-8 col-md-8">
								<#form:input path="name"  maxlength="255" class="form-control form-control-sm  required"/>
							</div>
						</div>
					</div>
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="">
							 性别：
							</label>
							<div class="col-lg-8 col-md-8">
								<#form:select path="sex" name="label" data="getDictList:sex" class="form-control form-control-sm select2bs4  " />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="">
							 年龄：
							</label>
							<div class="col-lg-8 col-md-8">
								<#form:input path="age"  maxlength="11" class="form-control form-control-sm required  digits"/>
							</div>
						</div>
					</div>
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="">
							 手机号：
							</label>
							<div class="col-lg-8 col-md-8">
								<#form:input path="mobile"  maxlength="32" class="form-control form-control-sm phone required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="">
							 部门：
							</label>
							<div class="col-lg-8 col-md-8">
								<#form:treeselect id="officeId" name="office.id" value="${javaTest.office.id!}" labelName="office.name"
										labelValue="${javaTest.office.name!}" title="部门" url="/sys/office/treeData?type=2" cssClass="form-control-sm required" notAllowSelectParent="true" />
							</div>
						</div>
					</div>

					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="">
								备注信息：
							</label>
							<div class="col-lg-8 col-md-8">
								<#form:textarea path="remarks" rows="4"  maxlength="255" class="form-control "/>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<div class="box-footer">
				<div class="row">
					<div class="offset-md-2 col-md-10">
						<% if (hasPermi('yili:javaTest:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="window.parent.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
					</div>
				</div>
			</div>
		</#form:form>
</div>
<% } %>

<script type="text/javascript">
	$("#inputForm").validate({
		submitHandler: function(form){
			js.ajaxSubmitForm($(form), function(data){
				if (data.result == 'false') {
					js.showErrorMessage(data.message);
				} else {
					js.showMessage(data.message);
				}

				if(data.result == 'true'){
					window.parent.closeCurrentTabPage(window.parent.refreshTab);
				}
			});
	    }
	});
</script>